package com.hbo.timer.pool;

import java.util.Date;
import java.util.TimerTask;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @author songxulin
 * @date 2022/3/19
 */
public class ScheduleTreadPoolTest {
    public static void main(String[] args) {
        ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
        for (int i = 0; i < 2; i++) {
//            scheduledThreadPool.schedule();
        }
    }
}
class FooTimerTask implements Runnable {
    private String name;

    public FooTimerTask(String name) {
        this.name = name;
    }


    public void run() {
        System.out.println(name);
    }
}